function debounce(fn, delay){
    let timeout;
    return function(...args){
        clearTimeout(timeout)
        timeout = setTimeout(() => {
            fn.apply(this, args)
            console.log('debounce')
        },delay)
    }
}

let debounceFn = debounce(() => {
    console.log('debounceFn')
}, 1000)


debounceFn()
